const {currentConfig} = require('./envConfig');
const fs = require('fs')
const path = require('path')
const privateKeyPath = path.join(__dirname, '../Alipay/rsa_private_key.pem')
const alipayPublicKeyPath = path.join(__dirname, '../Alipay/alipay_public_key.pem')
const authConfig = {
    token: "xuxiao",
    appId: 'wxeb547f57a3e70941',
    appSecret: '9808869facfebc5d9241bdc6bb23cd63'
}
const ticketObj = {
    "errcode": 0,
    "errmsg": "ok",
    "ticket": "O3SMpm8bG7kJnF36aXbe88JZI1zPTL963saPQkTJ_7ulKSLQTlTFE15frF3ZonwZblQLd7gsTu663mERtlKB9w",
    "expires_in": 7200
}
const GoogleConfig = {
    client_id: "515428572517-rnue9oq3r9ev2q9f843516cuinmcru2d.apps.googleusercontent.com"
}
const AliPayConfig = {
    appId: '2021000148675589',
    gateway: 'https://openapi-sandbox.dl.alipaydev.com/gateway.do',
    redirectUri: `${currentConfig.frontendUrl}/login`,
    privateKey: fs.readFileSync(privateKeyPath, 'utf8'),
    alipayPublicKey: fs.readFileSync(alipayPublicKeyPath, 'utf8'),
}
const FeiShuConfig = {
    FEISHU_APP_ID: 'cli_a8a0bd93db76d013',
    FEISHU_APP_SECRET: '4b6L46WgeJTZvPoC3R9CBfTh7hJBIKjE',
    REDIRECT_URI: `${currentConfig.backendUrl}/auth/FeiShu`
}
const GitHubConfig = {
    GITHUB_CLIENT_ID: "Ov23limt7r1kysiiiNTr",
    GITHUB_CLIENT_SECRET: "0aff2bd7b5e4d8af416b63ebf4acd81f15561df5"
}
const GiteeConfig = {
    GITEE_CLIENT_ID: "245f4901a50b587e195dfa05ab5f986b8dfbe00b3f0ad1fb75848eafb003706a",
    GITEE_CLIENT_SECRET: "b0d2aacfe28409595c6940af1ac077e1beff9bd8ecafad35ea970ebfbe63bd13",
    REDIRECT_URI: `${currentConfig.backendUrl}/auth/Gitee`
}
module.exports = {
    weChatConfig: authConfig,
    ticketObj,
    GoogleConfig,
    AliPayConfig,
    FeiShuConfig,
    GitHubConfig,
    GiteeConfig
}